home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / NetHack 3.1.3 / source / src / sounds.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-01  |  16.5 KB  |  690 lines  |  [TEXT/R*ch]

  1. /*    SCCS Id: @(#)sounds.c    3.1    93/03/14    */
  2. /*    Copyright (c) 1989 Janet Walz, Mike Threepoint */
  3. /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5. #include "hack.h"
  6. #include "edog.h"
  7.  
  8. #ifdef OVLB
  9.  
  10. static int FDECL(domonnoise,(struct monst *));
  11. static int NDECL(dochat);
  12.  
  13. #endif /* OVLB */
  14.  
  15. #ifdef SOUNDS
  16.  
  17. #ifdef OVL0
  18.  
  19. void
  20. dosounds()
  21. {
  22.     register xchar hallu;
  23.     register struct mkroom *sroom;
  24.     register int vx, vy;
  25. #if defined(AMIGA) && defined(AZTEC_C_WORKAROUND)
  26.     int xx;
  27. #endif
  28.  
  29.     hallu = Hallucination ? 1 : 0;
  30.  
  31.     if(!flags.soundok || u.uswallow || Underwater) return;
  32.  
  33.     if (level.flags.nfountains && !rn2(400)) {
  34.     static const char *fountain_msg[4] = {
  35.         "hear bubbling water.",
  36.         "hear water falling on coins.",
  37.         "hear the splashing of a naiad.",
  38.         "hear a soda fountain!",
  39.     };
  40.     You(fountain_msg[rn2(3)+hallu]);
  41.     }
  42. #ifdef SINK
  43.     if (level.flags.nsinks && !rn2(300)) {
  44.     static const char *sink_msg[3] = {
  45.         "hear a slow drip.",
  46.         "hear a gurgling noise.",
  47.         "hear dishes being washed!",
  48.     };
  49.     You(sink_msg[rn2(2)+hallu]);
  50.     }
  51. #endif
  52.     if (level.flags.has_court && !rn2(200)) {
  53.     static const char *throne_msg[4] = {
  54.         "hear the tones of courtly conversation.",
  55.         "hear a sceptre pounded in judgment.",
  56.         "Someone shouts \"Off with %s head!\"",
  57.         "hear Queen Beruthiel's cats!",
  58.     };
  59.     int which = rn2(3)+hallu;
  60.     if (which != 2) You(throne_msg[which]);
  61.     else        pline(throne_msg[2], his[flags.female]);
  62.     return;
  63.     }
  64.     if (level.flags.has_swamp && !rn2(200)) {
  65.     static const char *swamp_msg[3] = {
  66.         "hear mosquitoes!",
  67.         "smell marsh gas!",    /* so it's a smell...*/
  68.         "hear Donald Duck!",
  69.     };
  70.     You(swamp_msg[rn2(2)+hallu]);
  71.     return;
  72.     }
  73.     if (level.flags.has_vault && !rn2(200)) {
  74.     if (!(sroom = search_special(VAULT))) {
  75.         /* strange ... */
  76.         level.flags.has_vault = 0;
  77.         return;
  78.     }
  79.     if(gd_sound())
  80.         switch (rn2(2)+hallu) {
  81.         case 1: {
  82.             boolean gold_in_vault = FALSE;
  83.  
  84.             for (vx = sroom->lx;vx <= sroom->hx; vx++)
  85.             for (vy = sroom->ly; vy <= sroom->hy; vy++)
  86.                 if (g_at(vx, vy))
  87.                 gold_in_vault = TRUE;
  88. #if defined(AMIGA) && defined(AZTEC_C_WORKAROUND)
  89.             /* Bug in aztec assembler here. Workaround below */
  90.             xx = ROOM_INDEX(sroom) + ROOMOFFSET;
  91.             xx = (xx != vault_occupied(u.urooms));
  92.             if(xx)
  93. #else
  94.             if (vault_occupied(u.urooms) != 
  95.              (ROOM_INDEX(sroom) + ROOMOFFSET))
  96. #endif /* AZTEC_C_WORKAROUND */
  97.             {
  98.             if (gold_in_vault)
  99.                 You(!hallu ? "hear someone counting money." :
  100.                 "hear the quarterback calling the play.");
  101.             else
  102.                 You("hear someone searching.");
  103.             break;
  104.             }
  105.             /* fall into... (yes, even for hallucination) */
  106.         }
  107.         case 0:
  108.             You("hear the footsteps of a guard on patrol.");
  109.             break;
  110.         case 2:
  111.             You("hear Ebenezer Scrooge!");
  112.             break;
  113.         }
  114.     return;
  115.     }
  116.     if (level.flags.has_beehive && !rn2(200)) {
  117.     switch (rn2(2)+hallu) {
  118.         case 0:
  119.         You("hear a low buzzing.");
  120.         break;
  121.         case 1:
  122.         You("hear an angry drone.");
  123.         break;
  124.         case 2:
  125.         You("hear bees in your %sbonnet!",
  126.             uarmh ? "" : "(nonexistent) ");
  127.         break;
  128.     }
  129.     return;
  130.     }
  131.     if (level.flags.has_morgue && !rn2(200)) {
  132.     switch (rn2(2)+hallu) {
  133.         case 0:
  134.         You("suddenly realize it is unnaturally quiet.");
  135.         break;
  136.         case 1:
  137.         pline("The hair on the back of your %s stands up.",
  138.             body_part(NECK));
  139.         break;
  140.         case 2:
  141.         pline("The hair on your %s seems to stand up.",
  142.             body_part(HEAD));
  143.         break;
  144.     }
  145.     return;
  146.     }
  147. #ifdef ARMY
  148.     if (level.flags.has_barracks && !rn2(200)) {
  149.     static const char *barracks_msg[4] = {
  150.         "hear blades being honed.",
  151.         "hear loud snoring.",
  152.         "hear dice being thrown.",
  153.         "hear General MacArthur!",
  154.     };
  155.     You(barracks_msg[rn2(3)+hallu]);
  156.     return;
  157.     }
  158. #endif /* ARMY */
  159.     if (level.flags.has_zoo && !rn2(200)) {
  160.     static const char *zoo_msg[3] = {
  161.         "hear a sound reminiscent of an elephant stepping on a peanut.",
  162.         "hear a sound reminiscent of a seal barking.",
  163.         "hear Doctor Doolittle!",
  164.     };
  165.     You(zoo_msg[rn2(2)+hallu]);
  166.     return;
  167.     }
  168.     if (level.flags.has_shop && !rn2(200)) {
  169.     if (!(sroom = search_special(ANY_SHOP))) {
  170.         /* strange... */
  171.         level.flags.has_shop = 0;
  172.         return;
  173.     }
  174.     if (tended_shop(sroom) &&
  175.         !index(u.ushops, ROOM_INDEX(sroom) + ROOMOFFSET)) {
  176.         static const char *shop_msg[3] = {
  177.             "hear someone cursing shoplifters.",
  178.             "hear the chime of a cash register.",
  179.             "hear Neiman and Marcus arguing!",
  180.         };
  181.         You(shop_msg[rn2(2)+hallu]);
  182.     }
  183.     return;
  184.     }
  185. }
  186.  
  187. #endif /* OVL0 */
  188. #ifdef OVLB
  189.  
  190. static const char *h_sounds[] = {
  191.     "beep", "boing", "sing", "belche", "creak", "cough", "rattle",
  192.     "ululate", "pop", "jingle", "sniffle", "tinkle", "eep"
  193. };
  194.  
  195. void
  196. growl(mtmp)
  197. register struct monst *mtmp;
  198. {
  199.     register const char *growl_verb = 0;
  200.  
  201.     if (mtmp->msleep || !mtmp->mcanmove || !mtmp->data->msound) return;
  202.  
  203.     /* presumably nearness and soundok checks have already been made */
  204.     if (Hallucination)
  205.         growl_verb = h_sounds[rn2(SIZE(h_sounds))];
  206.     else switch (mtmp->data->msound) {
  207.     case MS_MEW:
  208.     case MS_HISS:
  209.         growl_verb = "hisse";    /* hisseS */
  210.         break;
  211.     case MS_BARK:
  212.     case MS_GROWL:
  213.         growl_verb = "growl";
  214.         break;
  215.     case MS_ROAR:
  216.         growl_verb = "roar";
  217.         break;
  218.     case MS_BUZZ:
  219.         growl_verb = "buzze";
  220.         break;
  221.     case MS_SQEEK:
  222.         growl_verb = "squeal";
  223.         break;
  224.     case MS_SQAWK:
  225.         growl_verb = "screeche";
  226.         break;
  227.     case MS_NEIGH:
  228.         growl_verb = "neigh";
  229.         break;
  230.     case MS_WAIL:
  231.         growl_verb = "wail";
  232.         break;
  233.     }
  234.     if (growl_verb) pline("%s %ss!", Monnam(mtmp), growl_verb);
  235. }
  236.  
  237. /* the sounds of mistreated pets */
  238. void
  239. yelp(mtmp)
  240. register struct monst *mtmp;
  241. {
  242.     register const char *yelp_verb = 0;
  243.  
  244.     if (mtmp->msleep || !mtmp->mcanmove || !mtmp->data->msound) return;
  245.  
  246.     /* presumably nearness and soundok checks have already been made */
  247.     if (Hallucination)
  248.         yelp_verb = h_sounds[rn2(SIZE(h_sounds))];
  249.     else switch (mtmp->data->msound) {
  250.     case MS_MEW:
  251.         yelp_verb = "yowl";
  252.         break;
  253.     case MS_BARK:
  254.     case MS_GROWL:
  255.         yelp_verb = "yelp";
  256.         break;
  257.     case MS_ROAR:
  258.         yelp_verb = "snarl";
  259.         break;
  260.     case MS_SQEEK:
  261.         yelp_verb = "squeal";
  262.         break;
  263.     case MS_SQAWK:
  264.         yelp_verb = "screak";
  265.         break;
  266.     case MS_WAIL:
  267.         yelp_verb = "wail";
  268.         break;
  269.     }
  270.     if (yelp_verb) pline("%s %ss!", Monnam(mtmp), yelp_verb);
  271. }
  272.  
  273. /* the sounds of distressed pets */
  274. void
  275. whimper(mtmp)
  276. register struct monst *mtmp;
  277. {
  278.     register const char *whimper_verb = 0;
  279.  
  280.     if (mtmp->msleep || !mtmp->mcanmove || !mtmp->data->msound) return;
  281.  
  282.     /* presumably nearness and soundok checks have already been made */
  283.     if (Hallucination)
  284.         whimper_verb = h_sounds[rn2(SIZE(h_sounds))];
  285.     else switch (mtmp->data->msound) {
  286.     case MS_MEW:
  287.     case MS_GROWL:
  288.         whimper_verb = "whimper";
  289.         break;
  290.     case MS_BARK:
  291.         whimper_verb = "whine";
  292.         break;
  293.     case MS_SQEEK:
  294.         whimper_verb = "squeal";
  295.         break;
  296.     }
  297.     if (whimper_verb) pline("%s %ss.", Monnam(mtmp), whimper_verb);
  298. }
  299.  
  300. /* pet makes "I'm hungry" noises */
  301. void
  302. beg(mtmp)
  303. register struct monst *mtmp;
  304. {
  305.     if (mtmp->msleep || !mtmp->mcanmove ||
  306.     !(carnivorous(mtmp->data) || herbivorous(mtmp->data))) return;
  307.     /* presumably nearness and soundok checks have already been made */
  308.     if (mtmp->data->msound != MS_SILENT && mtmp->data->msound <= MS_ANIMAL)
  309.     (void) domonnoise(mtmp);
  310.     else if (mtmp->data->msound >= MS_HUMANOID)
  311.     verbalize("I'm hungry.");
  312. }
  313.  
  314. #endif /* OVLB */
  315.  
  316. #endif /* SOUNDS */
  317.  
  318. #ifdef OVLB
  319.  
  320. static int
  321. domonnoise(mtmp)
  322. register struct monst *mtmp;
  323. {
  324. #ifdef SOUNDS
  325.     register const char *pline_msg = 0;    /* Monnam(mtmp) will be prepended */
  326. #endif
  327.  
  328.     /* presumably nearness and sleep checks have already been made */
  329.     if (!flags.soundok) return(0);
  330.  
  331.     switch (mtmp->data->msound) {
  332.     case MS_ORACLE:
  333.         return doconsult(mtmp);
  334.     case MS_PRIEST:
  335.         priest_talk(mtmp);
  336.         break;
  337. #ifdef MULDGN
  338.     case MS_LEADER:
  339.     case MS_NEMESIS:
  340.     case MS_GUARDIAN:
  341.         quest_chat(mtmp);
  342.         break;
  343. #endif
  344. #ifdef SOUNDS
  345.     case MS_SELL: /* pitch, pay, total */
  346.         shk_chat(mtmp);
  347.         break;
  348.     case MS_SILENT:
  349.         break;
  350.     case MS_BARK:
  351.         if (flags.moonphase == FULL_MOON && night()) {
  352.         pline_msg = "howls.";
  353.         } else if (mtmp->mpeaceful) {
  354.         if (mtmp->mtame &&
  355.             (mtmp->mconf || mtmp->mflee || mtmp->mtrapped ||
  356.              moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5))
  357.             pline_msg = "whines.";
  358.         else if (EDOG(mtmp)->hungrytime > moves + 1000)
  359.             pline_msg = "yips.";
  360.         else
  361.             pline_msg = "barks.";
  362.         } else {
  363.         pline_msg = "growls.";
  364.         }
  365.         break;
  366.     case MS_MEW:
  367.         if (mtmp->mtame) {
  368.         if (mtmp->mconf || mtmp->mflee || mtmp->mtrapped ||
  369.             mtmp->mtame < 5)
  370.             pline_msg = "yowls.";
  371.         else if (moves > EDOG(mtmp)->hungrytime)
  372.             pline_msg = "miaos.";
  373.         else if (EDOG(mtmp)->hungrytime > moves + 1000)
  374.             pline_msg = "purrs.";
  375.         else
  376.             pline_msg = "mews.";
  377.         break;
  378.         } /* else FALLTHRU */
  379.     case MS_GROWL:
  380.         pline_msg = mtmp->mpeaceful ? "snarls." : "growls!";
  381.         break;
  382.     case MS_ROAR:
  383.         pline_msg = mtmp->mpeaceful ? "snarls." : "roars!";
  384.         break;
  385.     case MS_SQEEK:
  386.         pline_msg = "squeaks.";
  387.         break;
  388.     case MS_SQAWK:
  389.         pline_msg = "squawks.";
  390.         break;
  391.     case MS_HISS:
  392.         if (!mtmp->mpeaceful)
  393.         pline_msg = "hisses!";
  394.         else return 0;    /* no sound */
  395.         break;
  396.     case MS_BUZZ:
  397.         pline_msg = mtmp->mpeaceful ? "drones." : "buzzes angrily.";
  398.         break;
  399.     case MS_GRUNT:
  400.         pline_msg = "grunts.";
  401.         break;
  402.     case MS_NEIGH:
  403.         if (mtmp->mtame < 5)
  404.         pline_msg = "neighs.";
  405.         else if (moves > EDOG(mtmp)->hungrytime)
  406.         pline_msg = "whinnies.";
  407.         else
  408.         pline_msg = "whickers.";
  409.         break;
  410.     case MS_WAIL:
  411.         pline_msg = "wails mournfully.";
  412.         break;
  413.     case MS_GURGLE:
  414.         pline_msg = "gurgles.";
  415.         break;
  416.     case MS_BURBLE:
  417.         pline_msg = "burbles.";
  418.         break;
  419.     case MS_SHRIEK:
  420.         pline_msg = "shrieks.";
  421.         aggravate();
  422.         break;
  423.     case MS_IMITATE:
  424.         pline_msg = "imitates you.";
  425.         break;
  426.     case MS_BONES:
  427.         pline("%s rattles noisily.", Monnam(mtmp));
  428.         You("freeze for a moment.");
  429.         nomul(-2);
  430.         break;
  431.     case MS_LAUGH:
  432.         {
  433.         static const char *laugh_msg[4] = {
  434.             "giggles.", "chuckles.", "snickers.", "laughs.",
  435.         };
  436.         pline_msg = laugh_msg[rn2(4)];
  437.         }
  438.         break;
  439.     case MS_MUMBLE:
  440.         pline_msg = "mumbles incomprehensibly.";
  441.         break;
  442.     case MS_DJINNI:
  443.         if (mtmp->mtame) verbalize("Thank you for freeing me!");
  444.         else if (mtmp->mpeaceful) verbalize("I'm free!");
  445.         else verbalize("This will teach you not to disturb me!");
  446.         break;
  447.     case MS_HUMANOID:
  448.         if (!mtmp->mpeaceful) {
  449.         if (In_endgame(&u.uz) && is_mplayer(mtmp->data)) {
  450.             mplayer_talk(mtmp);
  451.             break;
  452.         } else {
  453.             return 0;    /* no sound */
  454.         }
  455.         }
  456.         /* Generic peaceful humanoid behaviour. */
  457.         if (mtmp->mflee)
  458.         pline_msg = "wants nothing to do with you.";
  459.         else if (mtmp->mhp < mtmp->mhpmax/4)
  460.         pline_msg = "moans.";
  461.         else if (mtmp->mconf || mtmp->mstun)
  462.         verbalize(!rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?");
  463.         else if (!mtmp->mcansee)
  464.         verbalize("I can't see!");
  465.         else if (mtmp->mtrapped)
  466.         verbalize("I'm trapped!");
  467.         else if (mtmp->mhp < mtmp->mhpmax/2)
  468.         pline_msg = "asks for a potion of healing.";
  469.         else if (mtmp->mtame && moves > EDOG(mtmp)->hungrytime)
  470.         verbalize("I'm hungry.");
  471.         /* Specific monster's interests */
  472.         else if (is_elf(mtmp->data))
  473.         pline_msg = "curses orcs.";
  474.         else if (is_dwarf(mtmp->data))
  475.         pline_msg = "talks about mining.";
  476.         else if (likes_magic(mtmp->data))
  477.         pline_msg = "talks about spellcraft.";
  478.         else if (carnivorous(mtmp->data))
  479.         pline_msg = "discusses hunting.";
  480.         else switch (monsndx(mtmp->data)) {
  481.         case PM_HOBBIT:
  482.             pline_msg = (mtmp->mhpmax - mtmp->mhp >= 10) ?
  483.                 "complains about unpleasant dungeon conditions."
  484.                 : "asks you about the One Ring.";
  485.             break;
  486.         case PM_ARCHEOLOGIST:
  487.     pline_msg = "describes a recent article in \"Spelunker Today\" magazine.";
  488.             break;
  489. # ifdef TOURIST
  490.         case PM_TOURIST:
  491.             verbalize("Aloha.");
  492.             break;
  493. # endif
  494.         default:
  495.             pline_msg = "discusses dungeon exploration.";
  496.         }
  497.         break;
  498.     case MS_SEDUCE:
  499. # ifdef SEDUCE
  500.         if (mtmp->data->mlet != S_NYMPH &&
  501.         could_seduce(mtmp, &youmonst, (struct attack *)0) == 1) {
  502.             (void) doseduce(mtmp);
  503.             break;
  504.         }
  505.         switch ((poly_gender() != mtmp->female) ? rn2(3) : 0) {
  506. # else
  507.         switch ((poly_gender() == 0) ? rn2(3) : 0) {
  508. # endif
  509.         case 2:
  510.             verbalize("Hello, sailor.");
  511.             break;
  512.         case 1:
  513.             pline_msg = "comes on to you.";
  514.             break;
  515.         default:
  516.             pline_msg = "cajoles you.";
  517.         }
  518.         break;
  519. # ifdef KOPS
  520.     case MS_ARREST:
  521.         if (mtmp->mpeaceful)
  522.         verbalize("Just the facts, %s.",
  523.               flags.female ? "Ma'am" : "Sir");
  524.         else {
  525.         static const char *arrest_msg[3] = {
  526.             "Anything you say can be used against you.",
  527.             "You're under arrest!",
  528.             "Stop in the name of the Law!",
  529.         };
  530.         verbalize(arrest_msg[rn2(3)]);
  531.         }
  532.         break;
  533. # endif
  534.     case MS_BRIBE:
  535.         if (mtmp->mpeaceful && !mtmp->mtame) {
  536.         (void) demon_talk(mtmp);
  537.         break;
  538.         }
  539.         /* fall through */
  540.     case MS_CUSS:
  541.         if (!mtmp->mpeaceful)
  542.         cuss(mtmp);
  543.         break;
  544.     case MS_NURSE:
  545.         if (uwep)
  546.         verbalize("Put that weapon away before you hurt someone!");
  547.         else if (uarmc || uarm || uarmh || uarms || uarmg || uarmf)
  548.         if (pl_character[0] == 'H')
  549.             verbalize("Doc, I can't help you unless you cooperate.");
  550.         else
  551.             verbalize("Please undress so I can examine you.");
  552. # ifdef TOURIST
  553.         else if (uarmu)
  554.         verbalize("Take off your shirt, please.");
  555. # endif
  556.         else verbalize("Relax, this won't hurt a bit.");
  557.         break;
  558.     case MS_GUARD:
  559.         if (u.ugold)
  560.         verbalize("Please drop that gold and follow me.");
  561.         else
  562.         verbalize("Please follow me.");
  563.         break;
  564.     case MS_SOLDIER:
  565.         {
  566.         static const char *soldier_foe_msg[3] = {
  567.             "Resistance is useless!",
  568.             "You're dog meat!",
  569.             "Surrender!",
  570.         },          *soldier_pax_msg[3] = {
  571.             "What lousy pay we're getting here!",
  572.             "The food's not fit for Orcs!",
  573.             "My feet hurt, I've been on them all day!",
  574.         };
  575.         verbalize(mtmp->mpeaceful ? soldier_pax_msg[rn2(3)]
  576.                       : soldier_foe_msg[rn2(3)]);
  577.         }
  578.         break;
  579.     case MS_RIDER:
  580.         if (mtmp->data == &mons[PM_DEATH] && mtmp->mpeaceful)
  581.         pline_msg = "is busy reading a copy of Sandman #9.";
  582.         else verbalize("Who do you think you are, War?");
  583.         break;
  584. #endif /* SOUNDS */
  585.     }
  586.  
  587. #ifdef SOUNDS
  588.     if (pline_msg) pline("%s %s", Monnam(mtmp), pline_msg);
  589. #endif
  590.     return(1);
  591. }
  592.  
  593.  
  594. int
  595. dotalk()
  596. {
  597.     int result;
  598.     boolean save_soundok = flags.soundok;
  599.     flags.soundok = 1;    /* always allow sounds while chatting */
  600.     result = dochat();
  601.     flags.soundok = save_soundok;
  602.     return result;
  603. }
  604.  
  605. static int
  606. dochat()
  607. {
  608.     register struct monst *mtmp;
  609.     register int tx,ty;
  610.     struct obj *otmp;
  611.  
  612. #ifdef POLYSELF
  613.     if (uasmon->msound == MS_SILENT) {
  614.     pline("As %s, you cannot speak.", an(uasmon->mname));
  615.     return(0);
  616.     }
  617. #endif
  618.     if (Strangled) {
  619.     You("can't speak.  You're choking!");
  620.     return(0);
  621.     }
  622.     if (u.uswallow) {
  623.     pline("They won't hear you out there.");
  624.     return(0);
  625.     }
  626.     if (Underwater) {
  627.     pline("Your speech is unintelligible underwater.");
  628.     return(0);
  629.     }
  630.  
  631.     if (!Blind && (otmp = shop_object(u.ux, u.uy)) != (struct obj *)0) {
  632.     /* standing on something in a shop and chatting causes the shopkeeper
  633.        to describe the price(s).  This can inhibit other chatting inside
  634.        a shop, but that shouldn't matter much.  shop_object() returns an
  635.        object iff inside a shop and the shopkeeper is present and willing
  636.        (not angry) and able (not asleep) to speak and the position contains
  637.        any objects other than just gold.
  638.     */
  639.     price_quote(otmp);
  640.     return(1);
  641.     }
  642.  
  643.     (void) getdir("Talk to whom? [in what direction]");
  644.  
  645.     if (u.dz) {
  646.     pline("They won't hear you %s there.", u.dz < 0 ? "up" : "down");
  647.     return(0);
  648.     }
  649.  
  650.     if (u.dx == 0 && u.dy == 0) {
  651. /*
  652.  * Let's not include this.  It raises all sorts of questions: can you wear
  653.  * 2 helmets, 2 amulets, 3 pairs of gloves or 6 rings as a marilith,
  654.  * etc...  --KAA
  655. #ifdef POLYSELF
  656.     if (u.umonnum == PM_ETTIN) {
  657.         You("discover that your other head makes boring conversation.");
  658.         return(1);
  659.     }
  660. #endif
  661. */
  662.     pline("Talking to yourself is a bad habit for a dungeoneer.");
  663.     return(0);
  664.     }
  665.  
  666.     tx = u.ux+u.dx; ty = u.uy+u.dy;
  667.     mtmp = m_at(tx, ty);
  668.     if ((Blind && !Telepat) || !mtmp || mtmp->mundetected ||
  669.         mtmp->m_ap_type == M_AP_FURNITURE ||
  670.         mtmp->m_ap_type == M_AP_OBJECT) {
  671.     pline("I see nobody there.");
  672.     return(0);
  673.     }
  674.     if (!mtmp->mcanmove || mtmp->msleep) {
  675.     pline("%s seems not to notice you.", Monnam(mtmp));
  676.     return(0);
  677.     }
  678.  
  679.     if (mtmp->mtame && mtmp->meating) {
  680.     pline("%s is eating noisily.", Monnam(mtmp));
  681.     return (0);
  682.     }
  683.  
  684.     return domonnoise(mtmp);
  685. }
  686.  
  687. #endif /* OVLB */
  688.  
  689. /*sounds.c*/
  690.